import React,{PureComponent} from 'react'
class App extends PureComponent{
    handClick=()=>{
        console.log(this)
    }
    componentDidMount(){
        document.querySelector('#btn').addEventListener('click',(e)=>{
            e.stopPropagation()
            console.log('原生事件')
        })
    }
    render(){
        return(
            <React.Fragment>
                {/* 合成事件 */}
                <button onClick={this.handClick} id="btn">点击</button>
            </React.Fragment>
        )
    }
}
export default App